package Utiles;

public class Pandigital {
	
	public static boolean isPandigital(String number){
		if(number.length() != 9){
			return false;
		}
		
		int posa = 0;
		int posb = 0;
		for(int i = 1; i <= 9; ++i){
			posa = number.indexOf(""+i);	
			if(posa < 0){
				return false;
			}
			posb = number.lastIndexOf(""+i);
			if(posa != posb){
				return false;
			}
		}
		
		return true;
	}
	
}
